package com.bookmanager.www.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.apache.ibatis.annotations.ConstructorArgs;

/**
 * <p>
 * 图书表
 * </p>
 *
 * @author 风离
 * @since 2021-09-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ToString
public class FlBook implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 图书唯一id
     */
    private String bookId;

    private String bookUpId;

    /**
     *  0 默认上架 1下架
     */
    private Integer status;

    /**
     * 图书的书名
     */
    private String title;

    /**
     * 作者的简要描述
     */
    private String authorIntro;

    /**
     * 图书封面
     */
    private String img;

    /**
     * 书的ISBN 每一个ISBN基本上为固定长度 故用char
     */
    private String isbn;

    /**
     * 作者
     */
    private String author;

    /**
     * 图书的价格 偷懒一下~~
     */
    private String  price;


    private String pages;

    private String doubanScore;

    private String douban;

    private String published;



    //BigDecimal
    /**
     * 图书属于哪个分类
     */
    private Integer categoriesId;

    /**
     * 图书的库存
     */
    private Integer inventory;

    /**
     * 图书的描述
     */
    private String describe;

    /**
     * 图书的出版社
     */
    private String bookPress;

    /**
     * 图书创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 图书信息修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    public FlBook() {
    }

    public FlBook(String bookId, String bookUpId, Integer status, String title, String authorIntro, String img, String isbn, String author, String price, String pages, String doubanSource, String douban, String published, Integer categoriesId, Integer inventory, String describe, String bookPress, LocalDateTime createTime, LocalDateTime updateTime) {
        this.bookId = bookId;
        this.bookUpId = bookUpId;
        this.status = status;
        this.title = title;
        this.authorIntro = authorIntro;
        this.img = img;
        this.isbn = isbn;
        this.author = author;
        this.price = price;
        this.pages = pages;
        this.doubanScore = doubanSource;
        this.douban = douban;
        this.published = published;
        this.categoriesId = categoriesId;
        this.inventory = inventory;
        this.describe = describe;
        this.bookPress = bookPress;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public FlBook(String bookId, String bookUpId, Integer status, String title, String authorIntro, String img, String isbn, String author, String price, Integer categoriesId, Integer inventory, String describe, String bookPress, LocalDateTime createTime, LocalDateTime updateTime) {
        this.bookId = bookId;
        this.bookUpId = bookUpId;
        this.status = status;
        this.title = title;
        this.authorIntro = authorIntro;
        this.img = img;
        this.isbn = isbn;
        this.author = author;
        this.price = price;
        this.categoriesId = categoriesId;
        this.inventory = inventory;
        this.describe = describe;
        this.bookPress = bookPress;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

}
